package cn.gzjp.modules.logis.entity;

import org.hibernate.validator.constraints.Length;

import cn.gzjp.common.persistence.DataEntity;
import cn.gzjp.common.utils.excel.annotation.ExcelField;

import java.util.Date;

/**
 * 分享好友Entity
 * @author zengcp
 * @version 2018-03-31
 */
public class LogisShareFriend extends DataEntity<LogisShareFriend> {
	
	private static final long serialVersionUID = 1L;
	private String openid;		// openid
	private String friendOpenid;		// 好友openid
	private Integer score;		// 分享获得积分
	private Integer reward;		// 奖励金

	private Date startDate;
	private Date endDate;

	private String unionId;

	private int type; //0好友 1车队
	
	public LogisShareFriend() {
		super();
	}

	public LogisShareFriend(String id){
		super(id);
	}

	@Length(min=0, max=32, message="openid长度必须介于 0 和 32 之间")
	@ExcelField(title="openid", align=2, sort=1)
	public String getOpenid() {
		return openid;
	}

	public void setOpenid(String openid) {
		this.openid = openid;
	}
	
	@Length(min=0, max=32, message="好友openid长度必须介于 0 和 32 之间")
	@ExcelField(title="好友openid", align=2, sort=2)
	public String getFriendOpenid() {
		return friendOpenid;
	}

	public void setFriendOpenid(String friendOpenid) {
		this.friendOpenid = friendOpenid;
	}
	
	@ExcelField(title="分享获得积分", align=2, sort=3)
	public Integer getScore() {
		return score;
	}

	public void setScore(Integer score) {
		this.score = score;
	}
	
	@ExcelField(title="奖励金", align=2, sort=4)
	public Integer getReward() {
		return reward;
	}

	public void setReward(Integer reward) {
		this.reward = reward;
	}

	public Date getStartDate() {
		return startDate;
	}

	public void setStartDate(Date startDate) {
		this.startDate = startDate;
	}

	public Date getEndDate() {
		return endDate;
	}

	public void setEndDate(Date endDate) {
		this.endDate = endDate;
	}

	public String getUnionId() {
		return unionId;
	}

	public void setUnionId(String unionId) {
		this.unionId = unionId;
	}

	public int getType() {
		return type;
	}

	public void setType(int type) {
		this.type = type;
	}
}